<template>
    <div id="swipar">
        <van-swipe class="my-swipe" :style="{ height: props.imgheight + 'rem' }" :autoplay="3000"
            indicator-color="white" lazy-render>
            <van-swipe-item v-for="(item, index) in props.item" :key="index">
                <img :src="item" width="100%" height="100%" alt="">
                <div>{{ item }}</div>
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script setup lang="ts">

const props = defineProps({
    imgheight: Number,
    item: Array
})

console.log(props);

</script>

<style scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    width: 100%;
    text-align: center;
    background-color: #39a9ed;
}
</style>